package com.party.web.web.dto.output.information;

import com.party.core.model.information.Information;
import org.apache.commons.beanutils.BeanUtils;

import java.lang.reflect.InvocationTargetException;

public class InformationOutput extends Information {
    public String cityName;
    private String qrCodeUrl;
    private String informationTypeName;

    public String getCityName() {
        return cityName;
    }

    public void setCityName(String cityName) {
        this.cityName = cityName;
    }

    public String getQrCodeUrl() {
        return qrCodeUrl;
    }

    public void setQrCodeUrl(String qrCodeUrl) {
        this.qrCodeUrl = qrCodeUrl;
    }

    public String getInformationTypeName() {
        return informationTypeName;
    }

    public void setInformationTypeName(String informationTypeName) {
        this.informationTypeName = informationTypeName;
    }

    public static InformationOutput transform(Information information) {
        InformationOutput output = new InformationOutput();
        try {
            BeanUtils.copyProperties(output, information);
        } catch (IllegalAccessException | InvocationTargetException e) {
            e.printStackTrace();
        }
        return output;
    }
}
